package com.freewater.javabase.demo.designpattern.state;

public class CandyMachineClient {
    public static void main(String[] args) {
        CandyMachine candyMachine = new CandyMachine(3);
        for (int i = 0; i < 4; i++) {
            candyMachine.printState();
            candyMachine.insertCoin();
            candyMachine.printState();
            candyMachine.turnCrank();
            candyMachine.printState();
            candyMachine.dispense();
            candyMachine.printState();
        }
    }
}
